export interface IListItem {
  id: number
  mobile: string
  price: number
  level: {
    key: number
    label: string
  }
  status: {
    key: number
    label: string
  }
}

interface IPageInfo {
  current_page: number
  page_size: number
  total_count: number
}

export interface IState {
  prettyInfo: {
    list: Array<IListItem>
    page_info: IPageInfo
  }
  currentPrettyDetail: {
    id: number
    mobile: string
    price: number
    level: number
    status: number
  }
}

export interface IPrettyDetailParam {
  id: number
}

interface IPrettyListParam {
  current_page: number
  page_size: number
}

interface IAddPrettyParam {
  mobile: string
  price: number
  level: number
  status: number
}

interface IDeletePrettyParam {
  "id": Array<number> | number,
}

interface IUpdatePrettyParam {
  id: number
  mobile: string
  price: number
  level: number
  status: number
}

export interface IActions {
  requestPrettyDetailAction: (params: IPrettyDetailParam) => void
  requestPrettyListAction: (params: IPrettyListParam) => void
  addPrettyAction: (params: IAddPrettyParam) => Promise<boolean>
  deletePrettyAction: (params: IDeletePrettyParam) => Promise<boolean>
  updatePrettyAction: (params: IUpdatePrettyParam) => Promise<boolean>
}

export enum PRETTY_URL_TYPE {
  PRETTY_LIST = "pretty/list",
  PRETTY_ADD = "pretty/add",
  PRETTY_UPDATE = "pretty/update",
  PRETTY_DELETE = "pretty/delete",
  PRETTY_DETAIL = "pretty/detail"
}
